import request from "@/utils/request";

export const getNewsList = params => {
    return request({
      url: '/news/list_admin',  
      params
    })
} 
export const getNewsDetail = params => {
  return request({
    url: '/news/detail_admin',  
    params
  })
} 

export const addNews = data => {
  return request({
    url: '/news/add', 
    method: 'POST',
    data
  })
} 
export const editNews = data => {
  return request({
    url: '/news/edit', 
    method: 'POST',
    data
  })
} 

export const deleteNews = data => {
  return request({
    url: '/news/delete', 
    method: 'POST',
    data
  })
} 
export const getNewsCateList = params => {
    return request({
      url: '/news/category/list',  
      params
    })
} 
export const getAllCateList = params => {
  return request({
    url: '/news/category/alllist',  
    params
  })
} 

export const addNewsCate = data => {
    return request({
      url: '/news/category/add', 
      method: 'POST',
      data
    })
} 
  
export const getNewsCateDeail = params => {
    return request({
      url: '/news/category/detail', 
      params
    })
} 

export const editNewsCate = data => {
    return request({
      url: '/news/category/edit', 
      method: 'POST',
      data
    })
} 

export const deleteNewsCate = data => {
    return request({
      url: '/news/category/delete', 
      method: 'POST',
      data
    })
} 